package course.mytreeset;

import java.util.TreeMap;

public class MyTreeSet {
    public static void main(String[] args) {
        TreeMap<Student,String> tm = new TreeMap<>();

        Student stu1 = new Student("zhangsan",23);
        Student stu2 = new Student("lisi",22);
        Student stu3 = new Student("wangwu",23);


        tm.put(stu1,"合肥");
        tm.put(stu2,"南京");
        tm.put(stu3,"杭州");

        tm.forEach(
                (stu,o)->{
                    System.out.println(stu+"..."+o);
                });
    }
}
